<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
    
    <div id="topHeader" style="height: 100px;">	
    <h:form>
            
	<div id="leftCommon">
       <p:megaMenu activeIndex="0">
	
		<p:menuitem value="Home" action="#{loginBean.goToHome()}" 
			icon="ui-icon-home" ajax="false" />
		<p:menuitem value="Profile" rendered="#{loginBean.isLoged()}" 
			action="#{loginBean.goToProfile()}" icon="ui-icon-wrench" />
		<p:menuitem value="Login" action="#{loginBean.logout()}" rendered="#{!loginBean.isLoged()}" />
		<p:menuitem value="Logout" action="#{loginBean.logout()}" rendered="#{loginBean.isLoged()}" icon="ui-icon-extlink" /> 
	</p:megaMenu> 
        <p:outputLabel style="font-size: small;font-style: italic;margin-left: 10px;" value="Welcome, #{loginBean.getUserFullName()}" rendered="#{loginBean.isLoged()}" onclick="return false;"/>            	
        </div>
         <div id="middleCommon">   
            <p:megaMenu>
                <p:menuitem action="#{loginBean.goToNewEvent()}" value="New Event" ajax="false"/> 
                <p:menuitem action="#{loginBean.goToManagerEvent()}" value="My Events" ajax="false"/> 
                <p:menuitem action="#{loginBean.goToNotifyCenter()}" value="Notifications Center" ajax="false"/> 
         </p:megaMenu>
          </div>   
         <div id="rightCommon">
             <img src="#{request.contextPath}/resources/images/Logo_small.png" 
                 alt="MeteoCal_logo" width="110px"/>
        </div>
        <div id="alerts">
        <h:panelGrid id="notify" columns="2">
                            <h:outputLabel  value="Notifications invite:" />
                            <h:outputLabel  value="#{loginBean.notifyCounter}" />   
                            <h:outputLabel  value="Bad Weather alerts:" />
                            <h:outputLabel  value="#{loginBean.badweatherCounter}" /> 
              </h:panelGrid> 
            </div>
	</h:form>
    </div>
</ui:composition>